﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.ServiceModel.Channels;
using ATM_Banking_Service.DAO;
using System.Text;

namespace ATM_Banking_Service.Service
{
    partial class ATM_Manager : IATM
    {
        private ServiceHost _host;

#if DEBUG
        public ATM_Manager()
        {
            Console.WriteLine("New instance of service.");
        }
#endif


        public void Start()
        {
            Type servicetype = this.GetType();
            _host = new ServiceHost(servicetype);
            _host.Open();
        }

        public void Stop()
        {
            _host.Close();
        }
       
    }
}
